package jnpf.service;

import jnpf.entity.utils.IdUtils;
import jnpf.mapper.NewCreateMapper;
import jnpf.model.newCreate.dto.NewCreateDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NewCreateService {

    @Autowired
    private NewCreateMapper newCreateMapper;

    public boolean newCreated(NewCreateDTO newCreateDTO) {
        newCreateDTO.setId(IdUtils.getUUID());
        int result = newCreateMapper.newCreated((newCreateDTO));
        boolean flag = false;
        if (result == 1) {
            flag = true;
        }
        return flag;
    }
}
